class ContentPaper extends egret.Sprite{

	private leftBorderLimit=6050;
	private rightBorderLimit=-4900;


	private longContent:egret.Bitmap;
	

	private bl_left;
	private bl_right;


	
	public constructor() {
		super();

		this.longContent=new egret.Bitmap(RES.getRes("longContent_png"));
        this.longContent.anchorOffsetX=this.longContent.width/2;
        this.longContent.x=1136/2;this.longContent.y=138;
        this.addChild(this.longContent);

		this.bl_left=false;
		this.bl_right=false;
		this.addEventListener(egret.Event.ENTER_FRAME,this.EF,this);
	}
	public GoLeft(){
		this.bl_right=false;
		this.bl_left=true;

		



	}
	public GoRight(){
		this.bl_right=true;
		this.bl_left=false;
	}
	private EF(e:egret.Event){
		
		if(this.bl_left&&this.longContent.x<this.leftBorderLimit){
			// console.log("123",this.longContent.x);
			this.longContent.x+=5;
		}
		else if(this.bl_right&&this.longContent.x>this.rightBorderLimit){
			this.longContent.x-=5;
			// console.log("123",this.longContent.x);
		}
	}
}